package com.itheima.tool;

import org.springframework.stereotype.Component;

//工具类,直接使用不需要让spring管理
public class BaseContext {


    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();


    public  static Long getId(){
        return threadLocal.get();
    }



    public static void setId(Long id){
        threadLocal.set(id);
    }
}
